package com.service.impl;

import java.util.Date;
public class OrderService implements IOrderService{
	IOrderDao orderDao = new OrderDao()；

	public Integer addOrder(String name){
		order order = newOrder Order();
		customer.setName(name);
		order.setAddDate(new Date());
		return OrderDao.save(order);
	}
	
	public void delOrder(Integer id){
		orderDao.delete(id);
	}
	
	public void delOrder(Order order){
		orderDao.delete(order);
	}
	
	public void updateOrder(Order order){
		orderDao.update(order);
	}
	
	public List<Order> listOrder(){
		return orderDao.findAll();
	}
	
	public Order getOrder(Integer id){
		return orderDao.get(id);
	}
	
	public List<Order> findOrder(String key) {
		return orderDao.findByParam(key);
	}
	
	public IOrderDao getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(IOrderDao orderDao) {
		this.orderDao = orderDao;
	}

}
